//
//  My_strcpy.c
//  指针进阶三
//
//  Created by 马鹏朔 on 2022/10/24.
//

#include<stdio.h>
#include<string.h>
#include<assert.h>
 char* my_strcpy(char* arr1,char* arr2)
{
    assert(arr1);
    assert(arr2);
     char* ret =arr1;
     while(*arr2!='\0')
     {
         *arr1 =*arr2;
         arr1++;
         arr2++;
     }
     *arr1='\0';
     return ret;
    
 }
        
int main()
{
    char arr1[]="abcdf";
    char arr2[20]={0};
    my_strcpy(arr2,arr1);
    printf("%s\n",arr2);
    return 0;
}
